<?php

require_once './application/controllers/ControllerBase.php';
require_once './application/core/CoreBase.php';
require_once './application/core/Admin/cacheAdm.php';
require_once './application/core/Admin/readAdm.php';
require_once './application/core/Admin/writeAdm.php';
require_once './application/core/Admin/versionAdm.php';

class AdminController extends ControllerBase
{

    public function indexAction()
    {
        $this->verifConnexion();
        $this->_redirector->gotoSimple('', '');
    }

    function sizecacheAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new cacheAdm($this);
        $t->getSizeCache();
    }

    function emptycacheAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new cacheAdm($this);
        $t->emptyCache();
    }

    function emptycachesessionAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new cacheAdm($this);
        $t->emptyCacheSession();
    }

    function readconfigAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new readAdm($this);
        $t->readIni();
    }

    function writeconfigAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new writeAdm($this);
        $t->writeIni();
    }

    function getversionAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new versionAdm($this);
        $t->getVersion();
    }

}